package com.biz.primus.app.erpbridge.feign;

import com.biz.primus.model.member.vo.MemberVo;
import com.biz.primus.model.member.vo.request.MemberRegisterRequestVo;
import com.biz.primus.model.member.vo.response.MemberRegisterResponseVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author jun.liu
 * @since 2017年11月29日
 * @usage
 * @reviewer
 */
@FeignClient(qualifier = "memberFeignClient", name = "service-member")
public interface MemberFeignClient {

    @ApiOperation("账号注册")
    @PostMapping("soa/memberService/register")
    MemberRegisterResponseVo register(@RequestBody MemberRegisterRequestVo reqVo);

    /**
     * 根据用户id查询用户信息
     * @param memberId
     */
    @ApiOperation("根据用户id查询会员信息")
    @GetMapping("soa/memberService/getUserInfoById")
    MemberVo getUserInfoById(@RequestParam("memberId") Long memberId);

    /**
     * 根据用户手机号码查询用户信息
     * @param mobile
     */
    @ApiOperation("根据用户手机号码查询用户信息")
    @GetMapping("soa/memberService/getUserInfoByMobile")
    MemberVo getUserInfoByMobile(@RequestParam("mobile") String mobile);
}